<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class RequestAuthenticationTest extends UnitTestCase
{
    function testingRequestAuthentication()
    {
        $struct = new Entity\RequestAuthentication();
        
        $this->assertIdentical($struct,new Entity\RequestAuthentication);
        $this->assertTrue($struct instanceof Entity\RequestAuthentication);
        
        $struct->identifier = 'php';
        $this->assertEqual( 'php', $struct->identifier);
        $struct->password = 'ezc';
        $this->assertEqual( 'ezc', $struct->password);
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'identifier' => 'php',
        'password' => 'ezc',
        );
        
        $struct = Entity\RequestAuthentication::__mock( $state );
        $this->assertEqual( 'php', $struct->identifier);
        $this->assertEqual( 'ezc', $struct->password);
    }
}

